<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增辅助安全域 ')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m"
			id="form-supplementarySecurityDomain-add">
			<div class="form-group">
				<label class="col-sm-3 control-label">安全域AID：</label>
				<div class="col-sm-8">
					<input id="aID" name="aID" class="form-control" type="text"
						required maxlength="32">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">安全域名称：</label>
				<div class="col-sm-8">
					<input id="nAME" name="nAME" class="form-control" type="text"
						required maxlength="50">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">辅助安全域权限：</label>
				<div class="col-sm-8">
					<input id="pRIVILEGES" name="pRIVILEGES" class="form-control"
						required type="text" maxlength="6">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">安全域密钥版本号：</label>
				<div class="col-sm-8">
					<input id="kVN" name="kVN" maxlength="2" class="form-control"
						type="text" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">实现方式：</label>
				<div class="col-sm-8">
					<input id="implOptions" name="implOptions" class="form-control"
						type="text" required maxlength="2">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">支持的最低安全级别：</label>
				<div class="col-sm-8">
					<select name="supportedLowestSecurityLevel"
						class="form-control m-b"
						th:with="type=${@dict.getType('bussiness_supportedLowestSecurityLevel')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
							th:value="${dict.dictValue}"></option>
					</select>

				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">支持的安全通道协议版本：</label>
				<div class="col-sm-8">

					<select name="supportedSecurityChannelProtocolVersion"
						class="form-control m-b"
						th:with="type=${@dict.getType('bussiness_spProtocolVersion')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
							th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否更新安全域初始密钥：</label>
				<div class="col-sm-8">
					<select name="keyUpdate" class="form-control m-b"
						th:with="type=${@dict.getType('bussiness_keyUpdate')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
							th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">初始安全域根密钥索引号：</label>
				<div class="col-sm-8">
					<input id="initKeyIndex" name="initKeyIndex" class="form-control"
						type="text" maxlength="11">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">更新后安全域根密钥索引号：</label>
				<div class="col-sm-8">
					<input id="updateKeyIndex" name="updateKeyIndex"
						class="form-control" type="text" maxlength="11">
				</div>
			</div>

		</form>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
		var prefix = ctx + "bussiness/supplementarySecurityDomain"
		$("#form-supplementarySecurityDomain-add").validate({
			rules : {
				xxxx : {
					required : true,
				},
				aID : {
					isAid : true,
				},
				initKeyIndex : {
					isNumber : true,
				},
				updateKeyIndex : {
					isNumber : true,
				},
				updateKeyIndex : {
					isNumber : true,
				},
				pRIVILEGES : {
					isNumber : true,
				},
				kvn : {
					isNumber : true,
				},
				implOptions : {
					isNumber : true,
				},
			},
			focusCleanup : true
		});

		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/add", $(
						'#form-supplementarySecurityDomain-add').serialize());
			}
		}
	</script>
</body>
</html>
